package org.eclipse.mylyn.rememberthemilk.ui;

import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.mylyn.rememberthemilk.core.RTMLog;

public class Logger {
	public static void logInfo(String message) {
		RTMLog.log(IStatus.INFO, IStatus.OK, message, null);
	}

	public static void logError(Throwable exception) {
		RTMLog.logError("Unexpected Exception", exception);
	}

	public static void logError(String message, Throwable exception) {
		RTMLog.log(IStatus.ERROR, IStatus.OK, message, exception);
	}

	public static IStatus createStatus(int severity, int code,
			String message, Throwable exception) {
		return new Status(severity, RTMUIPlugin.PLUGIN_ID, code,
			         message, exception);
	}

	public static void log(IStatus status) {
		RTMLog.log(status);
	}
}
